import _ from 'lodash'
// import { getRecentData } from '@/utils/study.js'

import hongkong_17 from '@/data/hongkong/year-17.js'
import hongkong_18 from '@/data/hongkong/year-18.js'
import hongkong_19 from '@/data/hongkong/year-19.js'
import hongkong_20 from '@/data/hongkong/year-20.js'
import hongkong_21 from '@/data/hongkong/year-21.js'
import hongkong_22 from '@/data/hongkong/year-22.js'
import hongkong_23 from '@/data/hongkong/year-23.js'
import hongkong_24 from '@/data/hongkong/year-24.js'
import hongkong_25 from '@/data/hongkong/year-25.js'

import macau_22 from '@/data/macau/year-22.js'
import macau_23 from '@/data/macau/year-23.js'
import macau_24 from '@/data/macau/year-24.js'
import macau_25 from '@/data/macau/year-25.js'

import {
  TWO_GROUP_MAP,
  THREE_GROUP_MAP,
  FOUR_GROUP_MAP,
  FIVE_GROUP_MAP,
  SIX_GROUP_MAP,
  SEVEN_GROUP_MAP,
  EIGHT_GROUP_MAP,
  TEN_GROUP_MAP,
  TWELVE_GROUP_MAP,
  SIXTEEN_GROUP_MAP,
  TWENTYFOUR_GROUP_MAP
} from '@/utils/study.js'

export const hongkongDataMap = {
  2017: hongkong_17,
  2018: hongkong_18,
  2019: hongkong_19,
  2020: hongkong_20,
  2021: hongkong_21,
  2022: hongkong_22,
  2023: hongkong_23,
  2024: hongkong_24,
  2025: hongkong_25
}
export const macauDataMap = {
  2022: macau_22,
  2023: macau_23,
  2024: macau_24,
  2025: macau_25
}

// console.log('FIVE_GROUP_MAP', FIVE_GROUP_MAP)

// 按组大小分类的分组映射
export const groupMapBySize = {
  two: TWO_GROUP_MAP,
  three: THREE_GROUP_MAP,
  four: FOUR_GROUP_MAP,
  five: FIVE_GROUP_MAP,
  six: SIX_GROUP_MAP,
  seven: SEVEN_GROUP_MAP,
  eight: EIGHT_GROUP_MAP,
  ten: TEN_GROUP_MAP,
  twelve: TWELVE_GROUP_MAP,
  sixteen: SIXTEEN_GROUP_MAP,
  twentyfour: TWENTYFOUR_GROUP_MAP
}

// hk 平铺数据
// export const hkAll = getRecentData(Object.values(hongkongDataMap).flat())
export const hkAll = _.chain(hongkongDataMap).cloneDeep().values().flatten().value()

// m 平铺数据
export const mAll = _.chain(macauDataMap).cloneDeep().values().flatten().value()
